package com.spring.sd.configurationtest;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * date: 2024/5/6
 */
@SpringBootApplication(scanBasePackages = "com.spring.sd.configurationtest")
public class MainTest {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(MainTest.class, args);


        //UserConfig userConfig = context.getBean(UserConfig.class);
        //System.out.println(userConfig);

        //UserA userA = context.getBean(UserA.class);
        //System.out.println(userA);
        //
        //UserB userB1 = (UserB) context.getBean("userB1");
        //UserB userB2 = (UserB) context.getBean("userB2");
        //System.out.println(userB1.getUserA());
        //System.out.println(userB2.getUserA());

        context.close();

    }
}
